package com.aaa.dang.modules.checkin.controller;

import com.aaa.dang.common.util.ResultModel;
import com.aaa.dang.modules.checkin.service.ICheckOut;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Map;

/**
 * @author 刘旭泽
 * @version 1.0
 * @date 2018/12/14
 * @description
 */
@Controller
@RequestMapping("/checkout")
public class CheckOut {

    @Autowired
    ICheckOut service;
    /**
     * 跳转到退宿页面
     * @return
     */
    @RequestMapping("/tocheckout")
    public String toCheckOut(){
        return "checkIn/checkout";
    }


    @RequestMapping("/updateUser")
    @ResponseBody
    public ResultModel updateUser(@RequestParam Map<String,Object> query){
         ResultModel mod = service.updateUser(query);
         return mod;
    }
    @RequestMapping("/getAllHistory")
    @ResponseBody
    public ResultModel getAllHistory(@RequestParam Map<String,Object> query){
        ResultModel mod = service.getAllHistory(query);
        return mod;
    }
   @RequestMapping("/getMsgByPhone")
   @ResponseBody
    public ResultModel getMsgByPhone(@RequestParam Map<String,Object> query){
       ResultModel mod = service.getMsgByPhone(query);
       return mod;
    }



}
